<?php
/**
 * Created by PhpStorm.
 * User: Zwc
 * Date: 2025/11/13
 * Time: 10:58
 */

namespace App\Domain;

use function PhalApi\DI;

class ConstellationDomain
{
    static $tableName = 'constellation';

    /**
     * 获取星座
     * @param $langId
     * @return void
     */
    public static function getConstellationData($langId)
    {
        $cond = 'del_flag = 0 and lang_id = '.$langId;
        $data = DI()->notorm->constellation
            ->where($cond)
            ->select('id,name')
            ->fetchAll();

        if (empty($data)) {
            $langId = LangDataDomain::getDefaultLangData();
            return self::getConstellationData($langId);
        }
        return $data;
    }


}